.class public Lcom/waiqin365/lightapp/im/utils/i;
.super Ljava/lang/Object;


# static fields
.field private static a:Lcom/waiqin365/lightapp/im/utils/i;


# instance fields
.field private b:Landroid/support/v4/util/LruCache;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/waiqin365/lightapp/im/utils/i;->a:Lcom/waiqin365/lightapp/im/utils/i;

    return-void
.end method

.method private constructor <init>()V
    .locals 6

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/utils/i;->b:Landroid/support/v4/util/LruCache;

    new-instance v0, Lcom/waiqin365/lightapp/im/utils/j;

    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Runtime;->maxMemory()J

    move-result-wide v2

    const-wide/16 v4, 0x8

    div-long/2addr v2, v4

    long-to-int v1, v2

    invoke-direct {v0, p0, v1}, Lcom/waiqin365/lightapp/im/utils/j;-><init>(Lcom/waiqin365/lightapp/im/utils/i;I)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/utils/i;->b:Landroid/support/v4/util/LruCache;

    return-void
.end method

.method public static declared-synchronized a()Lcom/waiqin365/lightapp/im/utils/i;
    .locals 2

    const-class v1, Lcom/waiqin365/lightapp/im/utils/i;

    monitor-enter v1

    :try_start_0
    sget-object v0, Lcom/waiqin365/lightapp/im/utils/i;->a:Lcom/waiqin365/lightapp/im/utils/i;

    if-nez v0, :cond_0

    new-instance v0, Lcom/waiqin365/lightapp/im/utils/i;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/im/utils/i;-><init>()V

    sput-object v0, Lcom/waiqin365/lightapp/im/utils/i;->a:Lcom/waiqin365/lightapp/im/utils/i;

    :cond_0
    sget-object v0, Lcom/waiqin365/lightapp/im/utils/i;->a:Lcom/waiqin365/lightapp/im/utils/i;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v1

    return-object v0

    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)Landroid/graphics/Bitmap;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/utils/i;->b:Landroid/support/v4/util/LruCache;

    invoke-virtual {v0, p1}, Landroid/support/v4/util/LruCache;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/graphics/Bitmap;

    return-object v0
.end method

.method public a(Ljava/lang/String;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/utils/i;->b:Landroid/support/v4/util/LruCache;

    invoke-virtual {v0, p1, p2}, Landroid/support/v4/util/LruCache;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/graphics/Bitmap;

    return-object v0
.end method
